#ifndef RAFT_TABLE
#define RAFT_TABLE
//"distributive system" max nodes num
#define MAX_NODESLEN 20
#include "net/ip/uip.h"
#include "ffz/bit-ops.h"
typedef struct RaftNodeTableItem
{
    //ip address formatted by uint16_t
    uip_ipaddr_t ip;
} RaftNodeTableItem;

/**
 * init the node's table
 * @param num tableItem num
 * */
uint16_t raftNodeTableInit(uint16_t num);
/**get the RaftNodeTableItem from node's table
 * */
RaftNodeTableItem *getRaftNodeTableItem(uint16_t index);

uint16_t getRaftNodeTableLength();

uip_ipaddr_t *getBroadcastAddr();

#endif